﻿    <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/HomePage.Master" AutoEventWireup="true" CodeBehind="TrainNumberSearch.aspx.cs" Inherits="Web.Views.Common.TrainNumberSearch" %>
<%@ Register src="../Controls/TrainSearchControl.ascx" tagname="TrainSearchControl" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

<meta name="Author" content="容易订票网,容易订票,火车票价查询,火车票价格查询,全国火车票价查询,火车,火车票,票价,全国火车票价格查询,订票,网上订票,铁路新闻,路局,春运,提速,北京南站">
<meta name="Keywords" content="容易订票网,容易订票,火车票价查询,火车票价格查询,全国火车票价查询,火车,火车票,票价,全国火车票价格查询,订票,网上订票,铁路新闻,路局,春运,提速,北京南站">
<meta name="Description" content="容易订票网,容易订票,火车票价查询,火车票价格查询,全国火车票价查询,火车,火车票,票价,全国火车票价格查询,订票,网上订票,铁路新闻,路局,春运,提速,北京南站">
 <script language="javascript" src="../../Content/JS/jquery-1.3.2.js"></script>
  <script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8326117-1");
pageTracker._trackPageview();
} catch(err) {}</script>
<script>

    function stripParen(str) {
        var s = str.indexOf('('); var e = str.indexOf(')');
        var r = str.substring(0, s) + str.substr(e + 1);
        return r;
    }

    function addEvent(obj, evType, fn) {
        if (obj.addEventListener) {
            obj.addEventListener(evType, fn, false);
            return true;
        } else if (obj.attachEvent) {
            var r = obj.attachEvent("on" + evType, fn);
            return r;
        } else {
            return false;
        }
    }

    function initSugg() {
        citySuggCore("txt_StartStation", null, "../Controls/CI.aspx?ci=");
        citySuggCore("txt_EndStation", null, "../Controls/CI.aspx?ci=");
    }
</script>
<script language="javascript" src="../../Content/JS/Suggest/city.js"></script>
<script language="javascript" src="../../Content/JS/Suggest/suggest.js"></script>
<script language="javascript" src="../../Content/JS/prototype.js"></script>
<script language="javascript" src="../../Content/JS/Scriptaculous/scriptaculous.js?load=effects"></script>
    </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlace" runat="server">
<script language="javascript">
    window.onload = function() {
        document.getElementById("timetable_v").className = "curr-nav";
        request();
        var arrCls = [];
        arrCls = getElementByClassName("charMark", "img");
        for (var i = 0; i < arrCls.length; i++) {
            addEvent(arrCls[i], "onclick", function(e) {
                var evt = e || window.event;
                var evtTarget = evt.target || evt.srcElement;
                //            if (evtTarget.nodeType == 3) {
                //                evtTarget = evtTarget.parentNode; //for Safari;      
                //            }
                document.getElementById("txt_TrainNumber").value += evtTarget.src.slice(-5).substring(0, 1).toUpperCase();
            })
        }
    }
</script>
<uc1:TrainSearchControl ID="TrainSearchControl1" runat="server" />
<div style="width:888px; border:1px solid #56bfee">
<div  style="margin:10px; font-size:10pt; font-weight:bolder;  text-align:left" ><span style="color:#ff0e05" id="spanTrainNumber" runat="server"> </span> 次列车详细信息</div>
<asp:GridView  runat="server" ID="dgvTrainNumberList"   AutoGenerateColumns="false"  DataSourceID="odsSearchByTrainNumber">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<table width="888px"  style="text-align:center">
<thead>
	<tr class="cx_xx_lm">
	<td>站次</td>
	<td>站名</td>
	<td>到达时间</td>
	<td>开车时间</td>
	<td>停留时间</td>
	<td>行车时间</td>
	<td>里程</td>
	<td>硬座</td>
	<td>硬卧下</td> 
	<td>软卧下</td>
	</tr>
</thead>
</table>
</HeaderTemplate>
<ItemTemplate>
<table width="888px" >
<tbody >
	<tr class="cx_xx_lm_cor"  onmouseover="this.style.backgroundColor='Yellow'"  onmouseout="this.style.backgroundColor='#fff5d9'"  style="text-align:center; height:20px; margin:2px;">
	<td width="60px" > <%# Eval("TrainNumber") %> </td>
	<td  bgcolor="#dddddd" width="80px" > <%# Eval("Station") %>  </td>
	<td  width="75px" >    <%# Eval("EndTime") %>  </td>
	<td  width="140px"><%# Eval("StartTime") %></td>
	<td    width="110px"> <%# Eval("StopTime") %></td>
	<td  width="100px"> <%# Eval("RunTime") %></td>
	<td width="60px" > <%# Eval("Mileage") %></td>
	<td width="60px"> <%# Eval("m_yz")%></td>
	<td  width="60px"> <%# Eval("m_yw")%></td>
	<td width="100px"> <%# Eval("m_rw")%></td>
	</tr>
</tbody>
</table>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<EmptyDataTemplate>
<div style="width:870px; text-align:left; padding:10px">
   <div style="font-size:12pt; color:#FF4E00; font-weight:bold" > 抱歉！没有搜索到该车次信息 ！</div>
<br />
可能的原因有：<br />
1、你输入的车次不正确<br />
2、没有满足搜索条件的信息。<br />
</div>
</EmptyDataTemplate>
<EmptyDataRowStyle BorderWidth="1"  HorizontalAlign="Left" />
</asp:GridView>
<asp:ObjectDataSource ID="odsSearchByTrainNumber" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="Search" 
        TypeName="Easydp.Controllers.TrainRouteController">
    <SelectParameters>
        <asp:QueryStringParameter Name="TrainNumber" QueryStringField="TrainNumber" 
            Type="String" />
    </SelectParameters>
        </asp:ObjectDataSource>

</div>
</asp:Content>
